<div class="row">
  <%= render 'menu' %>

  <div class="col-md-10">
    <div class="alert alert-warning">注意！更新密码以后需要重新登录。</div>

    <div class="card card-lg">
      <div class="card-body">
        <div style="max-width: 460px">
          <%= form_for @user, url: setting_path, method: :put do |f| %>
            <%= render "shared/error_messages", target: @user %>
            <input type="hidden" name="by" value="password" />
            <div class="form-group">
              <%= f.label :current_password %>
              <%= f.password_field :current_password, class: "form-control" %>
            </div>
            <div class="form-group">
              <%= f.label :password %>
              <%= f.password_field :password, class: "form-control" %>
            </div>

            <div class="form-group">
              <%= f.label :password_confirmation %>
              <%= f.password_field :password_confirmation, class: "form-control" %>
            </div>

            <div class="form-actions hide-ios">
              <%= f.submit t("users.update_password"), class: "btn btn-primary", 'data-disable-with' => t("common.saving") %>
            </div>
          <% end %>
        </div>
      </div>
    </div>
  </div>
</div>
